<?php
/**
 * Created by PhpStorm.
 * User: apple
 * Date: 2018/7/21
 * Time: 下午3:24
 */

/**
 * http://www.myleftstudio.com/reference/annotations.html
 *
 * @RoutePrefix("/pos")
 */
class PosController extends \Dai\Framework\Base\BaseController {

    /**
     * @Get("/index")
     * @Login(true)
     * @desc 申请pos机首页
     */
    public function indexAction() {
        $this->execute();
    }

    /**
     * @Get("/app")
     * @Login(true)
     * @desc pos机App页面
     */
    public function posAppAction() {
        $url = "https://www.yjpal.com/app/download/81A0036E0E279E1277344612E2F44526/flinmen.htm";
        header("Location: $url");
        exit;
    }

    /**
     * @Get("/page/apply")
     * @Login(true)
     * @desc 申请pos机页面
     */
    public function posApplyAction() {
        $url = "http://pdd.keepfoolish.cn/index.html";
        header("Location: $url");
        exit;
    }

    /**
     * @Action("askForPos")
     * @Post("/apply")
     * @Login(true)
     * @desc 申请pos机接口
     */
    public function askForPosAction()
    {
        $this->execute();
    }

    /**
     * @Get("/isapply")
     * @Login(true)
     * @desc 判断用户是否申请过pos机
     */
    public function isApplyAction()
    {
        $this->execute();
    }

    /**
     * @Get("/lists")
     * @Login(true)
     * @desc 获取用户申请pos机列表
     */
    public function posListAction()
    {
        $this->execute();
    }

    /**
     * @Get("/list/page")
     * @Login(true)
     * @desc 获取用户申请pos机列表页面
     */
    public function posListPageAction()
    {
        $url = "http://pdd.keepfoolish.cn/apply_list.html";
        header("Location: $url");
        exit;
    }

    /**
     * @Action("posActivate")
     * @Post("/activate")
     * @Login(true)
     * @desc 激活pos机申请
     */
    public function posActivateAction()
    {
        $this->execute();
    }

    /**
     * @Get("/activate/page")
     * @Login(true)
     * @desc 激活pos机申请红包页面
     */
    public function posActivatePageAction() {
        $url = "http://pdd.keepfoolish.cn/activate.html";
        header("Location: $url");
        exit;
    }

    /**
     * @Get("/detail/page")
     * @Login(true)
     * @desc pos机详情页面
     */
    public function posDetailPageAction() {
        $url = "http://pdd.keepfoolish.cn/detail.html";
        header("Location: $url");
        exit;
    }
}